<template>
  <page-header-wrapper :title="false">
    <a-card>1
      <div class="table-page-search-wrapper">
        <a-form layout="inline">
          <a-row :gutter="48">
            <a-col :md="6" :sm="24">
              <a-form-item label="筛选">
                <a-input :value="value" placeholder="请输入" />
              </a-form-item>
            </a-col>
            <a-col :md="(!advanced && 8) || 24" :sm="24">
              <span
                class="table-page-search-submitButtons"
                :style="(advanced && { float: 'right', overflow: 'hidden' }) || {}"
              >
                <a-button type="primary" @click="handleSearch(queryParam)" :loading="loading">查询</a-button>
                <a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
                <!-- <a @click="toggleAdvanced" style="margin-left: 8px">
                  {{ advanced ? '收起' : '展开' }}
                  <a-icon :type="advanced ? 'up' : 'down'" />
                </a> -->
              </span>
            </a-col>
          </a-row>
        </a-form>
      </div>
      <!-- <div class="table-operator">
        <a-button type="primary" icon="plus" @click="handleCreate()">新增记录</a-button>
      </div> -->

      <a-table ref="table" size="default" rowKey="key" :columns="columns" :data-source="loadData">
        <span slot="serial" slot-scope="text, record, index">
          {{ index + 1 }}
        </span>
      </a-table>
    </a-card>
  </page-header-wrapper>
</template>

<script>
import { getMemberTodoListUsingPOST } from '@/api/api/huiyuanguanli.ts'
export default {
  name: 'MemberListDetialTodo',
  components: {
  },
  data() {
    return {
      mdl: null,
      priceMdl: null,
      visible: false,
      priceVisible: false,
      value: '',
      confirmLoading: false,
      priceLoading: false,
      // 高级搜索 展开/关闭
      advanced: false,
      // 查询参数
      queryParam: {
        pageNo:1,
        pageSize:10,
        queryCondition:'',
        status:''
      },
      // 表头
      columns: [
        {
          title: '创建日期',
          dataIndex: 'createTime',
        },
        {
          title: '标题',
          dataIndex: 'title',
        },
        {
          title: '会员名',
          dataIndex: 'mem',
        },
        {
          title: '执行人',
          dataIndex: '123',
        },
        {
          title: '状态',
          dataIndex: '123',
        },
        {
          title: '逾期天数',
          dataIndex: '123',
        },
        {
          title: '完成日期',
          dataIndex: '123',
        },
        {
          title: '说明',
          dataIndex: '123',
        },
        // {
        //   title: '操作',
        //   dataIndex: 'action',
        //   width: '180px',
        //   scopedSlots: { customRender: 'action' },
        // },
      ],
      // 加载数据方法 必须为 Promise 对象
      loadData: [],
      loading:false,
      optionAlertShow: false,
    }
  },
  created() {
    this.handleSearch(this.queryParam)
  },
  methods: {
    handleSearch() {
      this.loading = true
      getMemberTodoListUsingPOST(this.queryParam)
        .then((res) => {
          this.loading = false
          this.loadData = res.data.list
        })
        .catch((error) => {
          this.$message.error(((error.response || {}).data || {}).msg || '请求出现错误')
        })
    },
  },
}
</script>
